php forum
php mysql forum
php mysql smarty
 
Topic Options
#100316 - 07/28/01 11:59 AM [fr] Tien au admin et pour ceux qui save pas
Killer Offline
Member

Registered: 04/30/01
Posts: 40
Loc: Étudiant
Tien Chuck quest ce que tu peu faire pour ca

Jun, 18 2001 - 16:10
contributed by: hx
Summary
This advisory shows how almost any script that uses cookie session/login data to validate CGI forms can be exploited if the users can post images.


Details
Known vulnerable:
* Ultimate Bulletin BoardT version 6.04e (and prior)
* ezboard 6.2, WWW Threads PHP 5.4
* vBulletin 2.0.0 Release Candidate 2 and before (later versions are safe)

Immune systems:
* Ultimate Bulletin BoardT version 6.04f

Allowing users to post inline images is potentially a bad thing. Having the user authentication based solely on cookies is another potentially bad thing. When you put them together, it gets a whole lot worse. We will explain this problem with reference to a typical forum system, but naturally, it can be extended to almost any other CGI script, not just limited to PHP scripts.

What is the problem? Well, by using an [img] (or HTML <img> or <iframe> or <script src=""> ) tag, the user is having anyone who views the thread access that image - that is perform an HTTP GET on the URL specified for the image. Even if it's not an image, it still can be accessed, but will display a broken image. This means that the user can put a CGI script inside [img] tags. This script will be called by whoever views that thread. When used maliciously, it could force the user to: unknowingly update their profile, respond to polls in a certain way, post new messages or threads, email a user with whatever text they want, the list goes on. This would be particularly worrying for a 'worm' to spread through a forum, filling it with rubbish posts.

For example, if a user posted something along these lines:
[img]http://your.forums/forums/newreply.cgi?action=newthread&subject=aaa&bod
y=some+naughty+words&submit=go[/img]

Then the post would go through, under the name of whoever viewed the image. This is of particular danger when an administrator views an image, which then calls a page in an online control panel - thus granting the user access to the control panel.

How can it be fixed? Well, there are a couple of ways to stop it, but the easiest (in PHP at least) seems to be to have most of the variables used by scripts be used through $HTTP_POST_VARS. So instead of checking for $action in a script, $HTTP_POST_VARS['action'] would be checked. This forces the user to use a POST request, not a GET. Alternatively, the sessionid could be required to come with the GET/POST request variables, rather than by cookie. Finally, in the specific case of [img] tags, the use of ? or & in the img URL can be disabled by some regexes.

If the software that you run is not secure, we recommend that you disable HTML and/or [img] tags, until the fixes have been implemented.

Possible workaround:
Verifying that a valid image was posted, for example test for its image size, and reject it if it is invalid:

<?php
//quick sample code follows
//$imagePath is the URL provided; doesn't matter if its via GET or POST

$imageInfo = getImageSize($imagePath);

if(!$imageInfo)
{
print("Sorry, image cannot be opened or is not a valid image type.");
}
elseif($imageInfo[0] >= 800 &#0124;&#0124; $imageInfo[1] >= 600)
{
print("Sorry, image too big");
}

//and so on
?>


Additional information
The information has been provided by Chris 'stallion' Lambert, John Percival, Ben Gollmer and David Dreezer.

Vien de me faire demolir mon forum a cause dun abus de ca

Pis vous dites votre forum efficace
pis **** ladresse de mon forum
bye
_________________________
KillerBee

Bzzzzzzzz

Top
#100317 - 07/28/01 05:34 PM Re: [fr] Tien au admin et pour ceux qui save pas
Charles Offline

Veteran

Registered: 10/22/00
Posts: 2637
Loc: London, UK
c pour cela qu'il faut mettre à jour ....
_________________________
Do you believe in love at first sight,
or should I walk by again?

Top
#100318 - 07/28/01 05:46 PM Re: [fr] Tien au admin et pour ceux qui save pas
Killer Offline
Member

Registered: 04/30/01
Posts: 40
Loc: Étudiant
oui mais 200 $
pour ca frown

ben la jai pas juste ca a faire le mettre a jours

justout quand ta 10 hack a reinstaller apres chaque mise a jours
_________________________
KillerBee

Bzzzzzzzz

Top
#100319 - 07/29/01 02:06 PM Re: [fr] Tien au admin et pour ceux qui save pas
Charles Offline

Veteran

Registered: 10/22/00
Posts: 2637
Loc: London, UK
Les mises à jours sont très faciles a effectuer avec beyond compare.

http://www.scootersoftware.com

sinon grace à multihack il est devenu très facile de réinstaller des hacks. Sur mes forums je met moins de 15 minutes pour en installer une dizaine.
_________________________
Do you believe in love at first sight,
or should I walk by again?

Top
#100320 - 07/29/01 04:48 PM Re: [fr] Tien au admin et pour ceux qui save pas
Killer Offline
Member

Registered: 04/30/01
Posts: 40
Loc: Étudiant
bon desoler de metre emporter mais disont que ces long gerer le monde

et refaire le forum

entk

ma essayer le compare dont tu parle

et ma installer le multiHack

@+
_________________________
KillerBee

Bzzzzzzzz

Top



Moderator:  Charles, Zarzal 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks